package com.wendu.oa.leave.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wendu.oa.leave.common.LeaveStatusEnum;

import java.io.Serializable;
import java.util.Date;

public class Leave implements Serializable {

    private String l_id;
    private String e_id;
    private Date l_date;
    private int l_status;

    private Date l_start;
    private Date l_end;
    private String l_cause;

    private String l_spr;
    private String l_sp_advice;
    private Date l_sp_date;

    private Date l_back;

    private String e_name;

    public String getStatusName(){//前端属性：statusName

        return LeaveStatusEnum.getName(l_status);

//        switch(l_status){
//            case 0:
//                return "未提交";
//            case 1:
//                return "待审批";
//            case 2:
//                return "已驳回";
//            case 3:
//                return "待销假";
//            case 4:
//                return "已销假";
//            default:
//                return null;
//        }
    }

    public String getL_id() {
        return l_id;
    }

    public void setL_id(String l_id) {
        this.l_id = l_id;
    }

    public String getE_id() {
        return e_id;
    }

    public void setE_id(String e_id) {
        this.e_id = e_id;
    }

    public Date getL_date() {
        return l_date;
    }

    public void setL_date(Date l_date) {
        this.l_date = l_date;
    }

    public int getL_status() {
        return l_status;
    }

    public void setL_status(int l_status) {
        this.l_status = l_status;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    public Date getL_start() {
        return l_start;
    }

    public void setL_start(Date l_start) {
        this.l_start = l_start;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    public Date getL_end() {
        return l_end;
    }

    public void setL_end(Date l_end) {
        this.l_end = l_end;
    }

    public String getL_cause() {
        return l_cause;
    }

    public void setL_cause(String l_cause) {
        this.l_cause = l_cause;
    }

    public String getL_spr() {
        return l_spr;
    }

    public void setL_spr(String l_spr) {
        this.l_spr = l_spr;
    }

    public String getL_sp_advice() {
        return l_sp_advice;
    }

    public void setL_sp_advice(String l_sp_advice) {
        this.l_sp_advice = l_sp_advice;
    }

    public Date getL_sp_date() {
        return l_sp_date;
    }

    public void setL_sp_date(Date l_sp_date) {
        this.l_sp_date = l_sp_date;
    }

    public Date getL_back() {
        return l_back;
    }

    public void setL_back(Date l_back) {
        this.l_back = l_back;
    }

    public String getE_name() {
        return e_name;
    }

    public void setE_name(String e_name) {
        this.e_name = e_name;
    }
}
